home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Georgia Wildfire Prevention
/
Georgia Wildfire Prevention.iso
/
pc
/
media
/
dirs
/
BackUp
/
Launcher.dir
/
00001_Script_WhichMovie
next >
Wrap
Text File
|
2001-06-04
|
4KB
|
133 lines
--This function picks which movie will be played next.
--PROPERTIES--
--currentMovie: The movie that is open now.
--Message: The message sent back from the currentMovie. Gives special instructions on where to go. Default = Next
--NextMovie: The move to be opened next.
global HotField, Neptune, WhichTest
property NextMovie, UserInfo
on new me
the soundDevice = "QT3Mix"
WhichTest = "PreTest"
NextMovie = "Intro"
UserInfo = [:]
return me
end
on WhichMovie me, message
sound(1).stop()
sound(2).stop()
if (NextMovie = "Test") and (WhichTest = "PostTest" or WhichTest = 2) then
NextMovie = "Credits"
else if Message = "Next" then
case (NextMovie) of
"Intro" : NextMovie = "Login"
Hotfield = "First Name"
"Login" : NextMovie = "Test"
"Test" : NextMovie = "MainMenu"
"WhatIsFire" : NextMovie = "MainMenu"
"GoodBad" : NextMovie = "MainMenu"
"WorkCenter" : NextMovie = "MainMenu"
"Reference" : NextMovie = "MainMenu"
"WildFire" : NextMovie = "FireTower"
Neptune = VOID
"CampFire" : NextMovie = "FireTower"
"WildFire" : NextMovie = "FireTower"
"Home" : NextMovie = "FireTower"
"WildLife" : NextMovie = "FireTower"
"PrescribedBurn" : NextMovie = "FireTower"
"Glossary" : NextMovie = "Reference"
"FAQ" : NextMovie = "Reference"
"Internet" : NextMovie = "Reference"
"Resources" : NextMovie = "Reference"
"Guide" : NextMovie = "Reference"
end case
else
case (Message) of
"Exit" : WhichTest = "PostTest"
NextMovie = "Test"
"PreTest" : WhichTest = "PreTest"
NextMovie = "Test"
"PostTest" : WhichTest = "PostTest"
NextMovie = "Test"
"WhatIsFireActivity" : NextMovie = "WhatIsFire"
"Exclusion" : NextMovie = "WildFire"
"HomeActivity" : NextMovie = "Home"
"HomeTest" : NextMovie = "Home"
"PrescribedBurnActivity" : NextMovie = "PrescribedBurn"
otherwise NextMovie = Message
end case
end if
-------------For the Zeus Utility------------------
-- global gNextMovie, gWhichTest,gMessage, gTheData
-- gNextMovie = NextMovie
-- gWhichTest = WhichTest
-- gMessage = Message
-- gTheData = UserInfo
-- window("ZeusTool").windowtype = 4
-- open window("ZeusTool")
-- window("ZeusTool").moveToFront()
-----------------------------------------------------------
go frame 1 of movie NextMovie
end
--adds elements to the user info list.
on EnterData me, TheData
repeat with counter = 1 to count(TheData)
set PropName = getPropAt(TheData, Counter)
set PropValue = getAProp(TheData, PropName)
SetaProp( UserInfo, PropName, PropValue)
end repeat
end
--Records the user's score.
on RecordData me
TheScribe = new(xtra "FileIO")
set MyPath = getOsDirectory()
if the MachineType = 256 then
delim= "\"
else
delim=":"
end if
OrigDelim=the itemdelimiter
the itemdelimiter=delim
mypath=mypath.item[1]&delim
the itemdelimiter=OrigDelim
openfile(TheScribe, MyPath & "TestData.txt", 0)
ExistingInfo = readFile(TheScribe)
closefile(TheScribe)
createFile(TheScribe, MyPath & "TestData.txt")
openfile(TheScribe, MyPath & "TestData.txt", 0)
NL = numtochar(13)&numtochar(10)
writeString(TheScribe, ExistingInfo & \
"Name: " & UserInfo.first && UserInfo.last & NL &\
"Address: " & UserInfo.address & NL &\
"City: " & UserInfo.city & NL &\
"State: " & UserInfo.state & NL &\
"Zip Code: " & UserInfo.zip & NL & NL &\
"PreTest Score: " & UserInfo.pretest & NL &\
"PostTest Score: " & UserInfo.posttest & NL & NL &\
"Logged In: " & UserInfo.DateTime & NL &\
"Finished: " & the date && "-" && the time & NL &\
"--------------------------------" & NL)
closefile(TheScribe)
end